package com.xyoto.takeawayBusiness.mapper;

import com.xyoto.takeawayBusiness.dto.ShoppingPropDto;
import com.xyoto.takeawayBusiness.entity.ShoppingAttribute;
import com.xyoto.takeawayBusiness.vo.ShoppingAttributeVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName:
 * @Author: 挽风
 * @Date: 2022
 * @Copyright: 2022 by 挽风
 * @Description:
 **/
public interface ShoppingAttributeMapper {

    /**
     * 批量存储商品属性
     * @param shoppingPropDtoList
     * @return
     */
    Integer batchProd(@Param("shoppingPropDtoList") List<ShoppingPropDto> shoppingPropDtoList);

    /**
     * 删除商品属性
     * @param id
     * @return
     */
    Integer removeProd(Integer id);

    /**
     * 删除当前商品的所有商品属性
     * @param shoppingId
     * @return
     */
    Integer deleteAttributeByShoppingId(Integer shoppingId);

    /**
     * 新增商品属性
     * @param shoppingPropDto
     * @return
     */
    Integer saveShoppingAttribute(ShoppingAttribute shoppingPropDto);

    /**
     * 查询商品属性
     * @param id
     * @return
     */
    List<ShoppingAttributeVo> getShoppingAttribute(Integer id);

    /**
     * 修改属性
     * @param shoppingPropDto
     * @return
     */
    Integer updateShoppingAttribute(ShoppingAttribute shoppingPropDto);

    /**
     * 新增商品属性
     * @param shoppingAttribute
     * @return
     */
    Integer addProdAttribute(ShoppingAttribute shoppingAttribute);
}
